import { createVuePlugin } from 'vite-plugin-vue2';
const { resolve } = require('path')
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
export default {
    plugins: [
        createVuePlugin(),
        // svg 图标
	    createSvgIconsPlugin({
            iconDirs: [resolve(process.cwd(), 'src/image/icons/svg')], // 在src下新建文件夹icons
            symbolId: 'icon-[dir]-[name]',
        }),
    ],
    resolve: {
        alias: {
            '@': '/src'
        }
    },
    css: {
        preprocessorOptions: {
            scss: {
                additionalData: '@import "@/css/app.scss";'
            }
        }
    },
    base: '',
    server: {
        host: '0.0.0.0',
        port: 3000,
        open: true
    }
};